<template>
  <elm-page-tb>
    <template #top>
      <el-input placeholder="请查询输入内容" prefix-icon='el-icon-search' size="mini" style="width: 250px;" v-model="postData.name" clearable></el-input>
      <right>
        <el-button-group>
          <el-button icon="el-icon-search" size="mini" @click="treebinding()">查询</el-button>
          <elm-open-button url="goods_type_edit" width="700" height="50%" title="新增" :data="{ pid: '0' }" icon="el-icon-edit" size="mini">新增</elm-open-button>
        </el-button-group>
      </right>
    </template>
    <elm-table-tree url="/business/wms/goods_type/GetTree" :post-data="postData" :default-expand-all="true" height="100%">
      <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
      <el-table-column prop="type" label="物资类别" width="300px" align="center" :sortable='true'></el-table-column>
      <el-table-column prop="notes" label="备注" align="center"></el-table-column>
      <el-table-column prop="sort" label="顺序" align="center" width="100px"></el-table-column>
      <el-table-column fixed="right" label="操作" width="180px" align="center">
        <template v-slot="scope">
          <elm-open-button url="goods_type_edit"  width="700" height="50%" title="编辑" :data="{ model: scope.row }" type="text">编辑</elm-open-button>
<!--          <elm-open-button url="goods_type_edit"  width="700" height="50%" :title="'新增[' + scope.row.type + ']的下级模块'" :data="{ pid: scope.row.id }" type="text">新增下级</elm-open-button>-->
          <elm-delete-button type="text" size="mini" url="/business/wms/goods_type/Delete" :data="{ id: scope.row.id }">删除</elm-delete-button>
        </template>
      </el-table-column>
    </elm-table-tree>
  </elm-page-tb>
</template>

<script>
export default {
  extends: elmVueBase,
  data() {
    return {
      postData: { name: null },
    }
  },
  created() {
  },
  methods: {
  }
}
</script>

<style scoped>
</style>